//引入封装好的 service
import service from "@/service/service";
import store from '@/store/index'

//根据自身需求
let _service = {
        GetData() {
            //console.log(store.state.user)
            return service.post(`Cupon/GetData/${store.state.user.act_id}`, { st: store.state.user.st });
        },
        //商品列表
        GetGoodsLst(pi, ps, name, od) {
            return service.post(`Cupon/GetGoodsLst/${store.state.user.act_id}`, { st: store.state.user.st, page_index: pi, page_size: ps, name: name, od: od });
        },
        //领取优惠券
        RcvCupon() {
            return service.post(`Cupon/RcvCupon/${store.state.user.act_id}`, { st: store.state.user.st });
        },
        //商城购买
        Buy(dateCode) {
            return service.post(`Cupon/Buy/${store.state.user.act_id}`, { st: store.state.user.st, data: dateCode });
        },
        //验证商品是否能假如购物车
        isAddShop(gid) {
            return service.post(`Cupon/ValidateGoods/${store.state.user.act_id}`, { st: store.state.user.st, gid: gid });
        },
        //活动中心数据
        GetAllActivity(mid) {
            return service.post(`cm/GetAllActivity?mid=${mid}`, { pageIndex: 1, pageSize: 999999 });
        }
    }
    //导出
export default _service